package com.zentrale1.noodlemail;

import com.zentrale1.noodlemail.actions.Action;
import com.zentrale1.noodlemail.actions.MoveAction;
import com.zentrale1.noodlemail.actions.ReplyAction;

/**
 * Creates Actions
 * @author afleig
 *
 */
public class ActionFactory 
{
	
	public static Action getAction(String name, Noodlemail noodle)
	{
		if (name.equals("move"))
			return new MoveAction(noodle);
		if (name.equals("reply"))
			return new ReplyAction(noodle);
		
		Noodlemail.log("Error: invalid action name: "+name);
		return null;
	}
}
